Skip to content

Stop testing unspecced POST /send#850

Merged
MadLittleMods merged 8 commits into
matrix-org:mainfrom
tulir:tulir/delete-unspecced-send
Mar 18, 2026
Merged

Stop testing unspecced POST /send#850
MadLittleMods merged 8 commits into
matrix-org:mainfrom
tulir:tulir/delete-unspecced-send

Conversation

@tulir

@tulir tulir commented Mar 13, 2026

Copy link
Copy Markdown
Member

Signed-off-by: Tulir Asokan <tulir@maunium.net>
@tulir

tulir commented Mar 14, 2026

Copy link
Copy Markdown
Member Author

Not sure what that test failure is 🤔

Comment thread tests/csapi/invalid_test.go Outdated
@anoadragon453

Copy link
Copy Markdown
Member

Not sure what that test failure is 🤔

panic: BUG: Empty package name encountered. will occur when gotestfmt receives an error and isn't able to parse the output. Try temporarily removing | .ci/scripts/gotestfmt from the following line in CI:

${{ matrix.env }} go test -v -json -tags "${{ matrix.tags }}" -timeout "${{ matrix.timeout }}" ./tests ./tests/csapi ${{ matrix.packages }} | .ci/scripts/gotestfmt

(I fixed this in a repo somewhere to prevent this obtuse error from shadowing the real one, but currently failing to find it or the solution...)

Comment thread .github/workflows/ci.yaml Outdated
- run: |
set -o pipefail &&
${{ matrix.env }} go test -v -json -tags "${{ matrix.tags }}" -timeout "${{ matrix.timeout }}" ./tests ./tests/csapi ${{ matrix.packages }} | .ci/scripts/gotestfmt
${{ matrix.env }} go test -v -json -tags "${{ matrix.tags }}" -timeout "${{ matrix.timeout }}" ./tests ./tests/csapi ${{ matrix.packages }} # | .ci/scripts/gotestfmt

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

panic: BUG: Empty package name encountered. will occur when gotestfmt receives an error and isn't able to parse the output. Try temporarily removing | .ci/scripts/gotestfmt from the following line in CI:

-- @anoadragon453, #850 (comment)

We did this in Synapse for example, element-hq/synapse#19326

@tulir

tulir commented Mar 17, 2026

Copy link
Copy Markdown
Member Author

It was just a compile error, tests should pass now

Comment thread tests/csapi/invalid_test.go Outdated
for _, testCase := range testCases {
res := alice.Do(t, "POST", []string{"_matrix", "client", "v3", "rooms", roomID, "send", "complement.dummy"}, client.WithJSONBody(t, testCase))
for i, testCase := range testCases {
res := alice.Do(t, "PUT", []string{"_matrix", "client", "v3", "rooms", roomID, "send", "complement.dummy", fmt.Sprintf("invalidnum-%d", i)}, client.WithJSONBody(t, testCase))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread tests/csapi/invalid_test.go Outdated
Comment thread tests/csapi/room_messages_test.go Outdated
Comment thread tests/csapi/room_messages_test.go Outdated
@tulir tulir requested a review from MadLittleMods March 17, 2026 22:15

@MadLittleMods MadLittleMods left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a few clean-up items

Comment thread helpers/txnid.go
tulir added 2 commits March 18, 2026 17:33
The txn send endpoint is tested below, so TestSendAndFetchMessage is only
relevant for testing /messages
@MadLittleMods MadLittleMods merged commit 3adcab3 into matrix-org:main Mar 18, 2026
7 of 8 checks passed
@MadLittleMods

Copy link
Copy Markdown
Collaborator

Thanks for cleaning up the test suite @tulir 🐻‍❄️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants